<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<style>
    .font-bold {
        font-size: 14px;
        margin: 20px 0;
    }
    .margin10{

    }
    @media print {
        .noprint{
            display: none;
        }
        h3{
            display: none;
        }
    }
</style>
<body class="gray-bg">
<input id="eBatchId" type="hidden" th:value="${eBatchId}" />
<input id="eallocationNum" type="hidden" th:value="${eallocationNum}" />
<div style="text-align: center;font-size:26px" th:text="${examName+eallocationNum+'考场'}"></div>
<div class="row" style="display: flex;flex-flow: wrap;padding-left: 10px">

</div>
<div class="columns noprint" style="text-align: center;margin: 20px 0">
    <button class="btn btn-success" style="margin-left:5px;" onclick="print()">立即打印</button>
</div>
<div th:include="include :: footer"></div>
<script>
    getData();
    function getData() {
        $.ajax({
            url: "/synthesize/printOutput/printList",
            type: 'GET',
            data: {
                eBatchId:$("#eBatchId").val(),
                eallocationNum:$("#eallocationNum").val()
            },
            success: function (res) {
                console.log("res",res);
                var list = res.data;
                var List = '';
                list.forEach(function (item, index) {
                    List += '<div class="" style="margin:6px">' +
                        '        <div>' +
                        '        <img style="width:98px;height:137px" src="'+item.photo+'" />' +
                        '        </div>' +
                        '        <div style="margin: 2px 0">'+item.name+'' +
                        '        </div>' +
                        '        <div>'+item.ticketNumber+'' +
                        '        </div>' +
                        '        <div style="margin-top:4px;border-bottom:1px solid #999;">' +
                        '            签名：</div>' +
                        '    </div>';
                });
                $(".row").html(List);
            }
        });
    }
</script>
</body>
</html>
